The following example shows a communication between a UDP endpoint (host 1) and a UDP client (host 2).
The first part of the example refers to the UDP endpoint and shows the configuration which allows the UDP endpoint to communicate with any UDP client.
The second part shows the settings of a UDP client.
The third and the fourth part are running in parallel: The third part shows the procedures on the UDP endpoint side done when communicating with a UDP client. The fourth part shows the equivalent steps done by the UDP client when communicating with the UDP endpoint.
Part 1 - host 1 is configured for use as UDP endpoint:
AT^SISS=0,address,"sockudp://10.10.0.219:6666"
The URC indicates that host 1 is waiting on UDP port 6666 and can send data to any UDP client. The URC indicates that host 2 has opened the connection to host 1 and has sent some data. ^SISR: 0, 23, 0, 10.10.0.22:6561
Hello, I'm the client! Host 1 is reading the text string received from host 2 and gets information about the remote client, i.e. the address of host 2. ^SISW: 0, 1500, 0
Hi, I'm the UDP endpoint! Host 1 is sending a text string to host 2. As a result, host 2 is receiving the URC "^SISR: 0, 1" shown below in part 4 of the example.
^SISW: 0, 1500, 0
Hello, I'm the client! Host 2 is writing a text string. As a result, host 1 is receiving the URC "^SISR: 0, 1" shown above in part 3 of this example. ^SISR: 0, 26
Hi, I'm the UDP endpoint. The response indicates that host 2 has received 26 characters from host 1.
|